Error Correction Hardware With Fault Detection

ABSTRACT

Error correction code (ECC) hardware includes write generation (Gen) ECC logic and a check ECC block coupled to an ECC output of a memory circuit with read Gen ECC logic coupled to an XOR circuit that outputs a syndrome signal to a syndrome decode block coupled to a single bit error correction block. A first MUX receives the write data is in series with an input to the write Gen ECC logic or a second MUX receives the read data from the memory circuit in series with an input of the read Gen ECC logic A cross-coupling connector couples the read data from the memory circuit to a second input of the first MUX or for coupling the write data to a second input of the second MUX. An ECC bit comparator compares an output of the write Gen ECC logic to the read Gen ECC logic output.

FIELD

Disclosed embodiments relate to Error Correction Circuits (ECCs), andmore particularly to hardware for fault detection of ECC logiccircuitry.

BACKGROUND

Error correction code (ECC) memory is a type of computer data storagethat can detect and correct most conventional types of internal datacorruption. ECC memory circuits may be used in computers where datacorruption cannot generally be tolerated, such as for scientific or forautomotive memories for safety critical Advanced Driver AssistanceSystems (ADAS) which need to comply with functional safety requirements.

Implementing ECC on memories (e.g., static random access memory (SRAM),read only memory (ROM), or flash memory) is a standard safety mechanismused in safety critical applications to ensure data integrity within thememories. Conventionally, ECC redundant bits (e.g., in a Hamming code)are added to the memory data contents by write path ECC logic circuitryand written together in the same cycle to the memory in order to providechecking of the data stored in the memory when the memory is read out byread path ECC logic circuitry. The ECC as used herein is for single biterror correction for single bit errors and a multi-bit error detectionfor multi-bit errors (e.g., double bit errors), generally usingredundant bits in a Hamming code.

Conventionally generate ECC hardware units are provided in the writepath and in the read path, with a generate ECC unit in the write pathand a check ECC block including another generate ECC unit in the readpath. The write path circuitry and read path circuitry have no crosscoupling connections and thus operate independently from one another.During a memory read operation, the ECC is re-recomputed by the checkECC block which is compared with the stored ECC by an XOR circuit. Theresult (output) of this XOR circuit is called the syndrome. If thesyndrome is zero, no error has occurred. If the syndrome is non-zero, itcan be used to index a table to a “Syndrome decode” to determine whichbits are in error in case of a single bit error correction (SEC), orthat the error is uncorrectable in case of a double bit error detection(DED). Accordingly, conventional ECC memory can generally maintain amemory system effectively free from most bit errors.

SUMMARY

This Summary briefly indicates the nature and substance of thisDisclosure. It is submitted with the understanding that it will not beused to interpret or limit the scope or meaning of the claims.

Disclosed embodiments recognize there can he transient or permanenterrors in the ECC logic hardware of ECC memory circuits in the writeside which can result in wrong ECC bits being written into the memoryduring the write operation. Transient or permanent errors in the ECClogic hardware in the read side of ECC memory circuits can result incorruption of memory read data or in the wrong flagging of memory readdata as corrupted when the read data is in fact not corrupted. Althoughit may be possible to detect transient/permanent errors in the ECC logicof ECC memory circuits, because the write path circuitry and read pathcircuitry are only known to operate independently this would requiresignificant additional logic to implement including the need for extraECC generation logic on both sides of the ECC memory circuit.

Disclosed embodiments solve this problem by providing lockstep ECCcircuit hardware comprising an error correction circuit that utilizescross-coupled connections between the write path circuitry and read pathcircuitry which enables the reuse of ECC generation logic on one side ofthe memory circuit to check for errors on the other side thus reducingthe ECC logic requirement and saving significant semiconductor chiparea. Disclosed embodiments include a method of fault detection for ECCcircuitry for a memory circuit having write generation (Gen) ECC logicin a write path circuitry and check ECC logic including read Gen ECClogic in read path circuitry. An output of the read Gen ECC logic and anoutput of the write Gen ECC logic are compared by a digital comparatorto check whether the respective bits strings match. A fault in the writeGen ECC logic or in the read Gen ECC logic is recognized when the bitsstrings do not match. In case of a lockstep error (mismatch incomparator output) during the write operation, the write operation canbe repeated. In case of a lockstep error during the read operation, thesingle bit errors can be corrected and a multi-bit error interruptsignal sent.

BRIEF DESCRIPTION OF THE DRAWINGS

Reference will now be made to the accompanying drawings, which are notnecessarily drawn to scale, wherein:

FIG. 1 is a block diagram of an example ECC memory circuit havingdisclosed lockstep ECC circuit hardware for fault detection in the readside ECC logic having a multiplexer with a first input for receivingwrite data in series with an input to the ECC generation logic,according to an example embodiment. Write data is selected during anormal write operation and read data is selected during the readoperation.

FIG. 2 is a block diagram of another example ECC memory circuit havingdisclosed lockstep ECC circuit hardware for fault detection in writeside ECC logic having a multiplexer with a first input for receiving theread data from the memory circuit in series with an input of the Gen ECClogic for fault detection in the ECC logic, according to an exampleembodiment.

FIG. 3 is a flow chart that shows steps in an example method of faultdetection for ECC circuitry, according to an example embodiment.

FIG. 4 is example ECC memory circuit including disclosed ECC hardwarefor fault detection in its read path and write path that essentiallycombines the read side and write side error checking embodimentsdescribed above relative to FIG. 1 and FIG. 2, according to an exampleembodiment.

FIG. 5 is a system diagram of an example ADAS system including twoinstances of the disclosed ECC memory circuit shown in FIG. 4 asprocessor memory having disclosed lockstep ECC circuit hardware forfault detection in the ECC logic in its read path and write path,according to an example embodiment.

DETAILED DESCRIPTION

Example embodiments are described with reference to the drawings,wherein like reference numerals are used to designate similar orequivalent elements. Illustrated ordering of acts or events should notbe considered as limiting, as some acts or events may occur in differentorder and/or concurrently with other acts or events. Furthermore, someillustrated acts or events may not be required to implement amethodology in accordance with this disclosure.

Also, the terms “coupled to” or “couples with” (and the like) as usedherein without further qualification are intended to describe either anindirect or direct electrical connection. Thus, if a first device“couples” to a second device, that connection can be through a directelectrical connection where there are only parasitics in the pathway, orthrough an indirect electrical connection via intervening itemsincluding other devices and connections. For indirect coupling, theintervening item generally does not modify the information of a signalbut may adjust its current level, voltage level, and/or power level.

FIG. 1 shows an ECC memory circuit 100 including a memory circuit 130(e.g., SRAM, RUM, or a flash memory chip) and disclosed “lockstep” ECChardware 110 having fault detection in its ECC logic circuitryconfigured for verifying the bit output of the read path Gen ECC 120 b ₁in the read path circuitry 120. The memory circuit 130 comprises asingle port memory where only one operation (read or write) can beperformed for a given clock pulse. This single port memory feature isrecognized to enable the bit output from one of the ECC GEN logics (theside that is not active at the particular time/clock, write not beingactive as shown in FIG. 1, and read not being active as shown in FIG. 2)to be available as a reference to enable disclosed lockstep errordetection.

The memory circuit 130 includes a common substrate 105 having at least asemiconductor surface. For example, the substrate 105 can comprise abulk silicon substrate, or an epitaxial layer on a bulk siliconsubstrate.

The memory circuit 130 has a separate data output and a separate ECCoutput. Data shown as k bits is stored along with ECC bits shown as rbits. For example, if a non-ECC memory stores 64 bits of data, then anECC memory will store the same 64 bits of data with an extra 8 bits ofECC. Hence 64+8 bits are written and 64+8 bits are read out. The ECC 8bits are used to validate the 64 data bits, and goes to the XOR logic inthe Check ECC.

There is write Generation (Gen) ECC logic 115 b in a write pathcircuitry 115 and check ECC logic 120 b including read Gen ECC logic 120b ₁ in the read path circuitry 120. While operating in the write mode(write mode is active in FIG. 2 described below), data bits (shown as WRdata, for example 64 bits) and the corresponding computed ECC bits (forexample 8 bits) from the write ECC Gen logic 115 b are each written intothe memory circuit 100 in the same clock cycle. In FIGS. 1 and 2 thedata width for the memory circuit 130 can in one example be 72 bits (72bit wide memory) including 64 bits (data) +8 bits (ECC), which can berealized as two separate memories of width 64 and width 8, or be asingle 72 bit wide memory.

As noted above 64 information/data bits and 8 ECC bits are onlyexamples. The actual number of ECC bits can be based on thecorresponding bit width for data (information), such as given in theexample below:

Number r bits of for Information SEC- Bits k DED 1 3 2 to 4 4 5 to 11 512 to 26 6 27 to 57 7 58 to 120 8 121 to 247 9 248 to 502 10

A multiplexer (Mux) 115 a is provided at the input of write GEN ECClogic 115 b to multiplex in cross-coupled read data provided bycross-coupled connection 150 shown as k hits from the memory circuit 130with the write (wr) data generally from a processor. The processor cancomprise a microprocessor, digital signal processor (DSP), or amicrocontroller unit (MCU). The Mux 115 a is shown having a select linethat is shown based on the memory circuit 130 being in the read modefrom a processor which is used to select which of the input linescomprising the rd data from the memory on one line and the wr data onthe other line to send to the Mux's 115 a output. When in the read mode,the rd data is selected by Mux 115 a, while when in the write mode, thewr data is selected.

A digital comparator 135 is coupled to receive at one input the outputfrom write Gen ECC logic 115 b (as a reference as it is inactive duringreading) and at its other output the output of the read path Gen ECC 120b ₁. Digital comparator 135 thus reuses the output from write Gen ECClogic 115 b for verifying the bit output of the read path Gen ECC 120 b₁, both shown only as an example as being 8 bits, Read Gen ECC 120 b 1together with an XOR circuit 120 b 2 constitute the check ECC block 120b. The output of the XOR circuit 120 b 2 provides “syndrome” signal tothe syndrome decode block 120 c. If the syndrome is zero, no error hasoccurred. If the syndrome is non-zero, the syndrome decode block 120 cdetermines which bits are in error (SEC), or that the error isuncorrectable (e.g., the error is a double bit error). Single bit errorsare provided to the SEC block 120 d which outputs corrected read datashown as rd data,

For ECC hardware 110, the output of the digital comparator 135 isconnected as an enable to the multi-bit (2 or more) error interruptgeneration and as an enable to the SEC block 120 d. Thus SEC of memoryread data by SEC block 120 d and multi-bit error flagging using thesyndrome computation provided by syndrome decode 120 c are both enabledby the enable signal from the digital comparator 135 if and only if theECC computations in the write path and the FCC computations in the readpath match one another (shown in FIG. 1 as the same r bits). If the BCCcomputations in the write path and the FCC computations in the read pathdo not match one another so that a lockstep error exists during readoperation, and single bit errors can be corrected and in the case of amulti-bit errors such as double bit errors, a bit error interrupt(disable) signal can be sent.

FIG. 2 shows an example FCC memory circuit 200 including disclosed ECChardware 110′ for fault detection in its write path including write GenFCC logic 115 b, where a MUX 120 e is added in the read path circuitry120′ and a cross-coupled connection 150′ is added from the write pathcircuitry 115′ to the MUX 120 e in the read path circuitry 120′ to muxthe write data to data read from the memory circuit 130. Here thedisclosed lockstep ECC hardware 110 having fault detection in its ECClogic circuitry is configured for verifying the bit output of the writeGen ECC logic 115 b while the write mode is active. A control inputshown as a “memory write” is the control signal which controls the MUX's120 e input selection node. When in the write mode, the wr data isselected by MUX 120 e, while when in the read mode, the rd data isselected.

ECC bits output by the read Gen ECC logic 120 b 1 is used to verifyoperation of the write Gen FCC logic 115 b by digital comparator 135which compares the FCC bits generated by the respective Gen FCC logics115 b and 120 b ₁. The output of the digital comparator 135 that isgenerated is used as an interrupt to a processor (e.g., amicroprocessor, digital signal processor (DSP), or a microcontrollerunit (MCU)) to repeat the write transaction. In case of an error beingflagged by the digital comparator 135 during a write operation, thewrite operation can be repeated to ensure that the data written into thememory circuit 130 is not in error. Repeating the write will generallyfix the hardware error problem if the error is a transient fault. Incase of a permanent fault, the digital comparator 135 will again keepgenerating an error in which case the processor can take appropriateaction such as indicating to the application software that a permanentfault has occurred in the system. This same fault response is true incase of a read operation also.

FIG. 3 is a flow chart that shows steps in an example method 300 offault detection for FCC circuitry associated with a single port memorycircuit, according to an example embodiment. Step 301 comprisescomparing an output of read Gen FCC logic (120 b ₁ in FIG. 1 and FIG. 2)to an output of a write Gen FCC logic (115 b in FIG. 1 and FIG. 2) Step302 comprises detecting a fault in the write Gen ECC logic or in theread Gen ECC logic when a comparison output from the comparingdetermines a value of the output of the write Gen ECC logic does notequal a value of the output of the read Gen ECC logic 120 b _(1.)

Step 103 comprises when the fault is a single-bit error during a readoperation, correcting the single-bit error, and when the fault is amulti-bit error during a read operation, sending a multi-bit errorinterrupt signal. When the fault is an error during a write operation,repeating the writing. As described above for memory circuit 101) inFIG. 1 implementing fault detection in the read side, single bit errorsare provided to the SEC block 120 d which outputs corrected read datashown as rd data. As described above for memory circuit 200 in FIG. 2implementing fault detection in the write side, the write operation canbe repeated to ensure that the data written into the memory chip is notin error.

The embodiments described above relative to FIG. 1 (write side errorchecking) and FIG. 2 (read side error checking) may be independentlypracticed (one without the other) to detect errors on one side of thememory circuit 130. Alternatively, the read side and write side errorchecking embodiments described above relative to FIG. 1 and FIG. 2 maybe combined together to enable error checking on both sides of thememory circuit 130.

FIG. 4 is example ECC memory circuit 400 including disclosed ECChardware 110″ for fault detection in both its read path and write paththat essentially combines the read side and write side error checkingembodiments described above relative to FIG. 1 and FIG. 2. Besides Mux115 a ECC memory circuit 400 includes a second Mux 120 e having a firstinput for receiving read data from the memory circuit 400 in series withan input of the read Gen ECC logic 120 b 1 and a cross-coupledconnection 150′ for coupling the write data to the second input. of thesecond MUX 120 e. Here the digital comparator 135 is involved in bothread side error checking and write side error checking.

In contrast to disclosed ECC memory circuits, for known ECC logic, theECC logic is used only to detect and correct internal memory (e.g., RAM)errors. For ECC memory circuits having disclosed ECC logic, faultdetection in the ECC logic is provided in addition to known detectionand correction of internal memory errors, where any transient/permanenterrors in the ECC computation and generation logic are also detectedwhich enables corrective action to be taken. As described above, in thecase of a lockstep error of the read Gen ECC 120 b ₁ (see FIG. 1), thesingle bit error can be corrected and a multi-bit error interrupt signalcan be generated. In case of a lockstep logic in error in the write GenECC logic 115 b (see FIG. 2), the write operation is repeated. Moreover,disclosed lockstep ECC circuit hardware is non-intrusive and can operatecontinuously (on every clock cycle, on-the fly) for checking memory ECClogic with only a limited area penalty in terms of additional Muxs andcomparators.

EXAMPLES

Disclosed embodiments are further illustrated by the following specificExamples, which should not be construed as limiting the scope or contentof this Disclosure in any way. FIG. 5 is a system diagram of an exampleADAS system 500 including two instances of the disclosed ECC memorycircuit shown in FIG. 4 shown as 400 ₁ and 400 ₂ including processormemory 130 ₁ (shown as processor memory 1) and 130 ₂ (shown as processormemory N). The ECC memory circuits have disclosed lockstep ECC circuithardware shown as ECC logic 110 ₁ and 110 ₂ for fault detection in theread path and write path of the processor memory. An image sensor 505(e.g. a CMOS color camera) generates image data from a scene (e.g., froma rear-view from an automobile). The image data is coupled to an imagerecognition system 515 by a camera interface 510. Image recognitionsystem 515 is shown including a video recognition processor 515 a, flashmemory 515 b, external DDR memory 515 c, and a controller area network(CAN) bus Tx/Rx (transceiver) 515 d.

The image recognition system 515 is coupled by a CAN bus 520 to theprocessor block 530 that includes a processor core 530 a. Processor core530 a is shown coupled by a bus interface 535 to utilize the processormemory 130 ₁ and 130 ₂ of ECC memory circuits 400 ₁ and 400 ₂. Duringoperation of ADAS system 500, as described above ECC memory circuits 400₁ and 400 ₂ using disclosed lockstep ECC circuit hardware utilizingcross-coupled connections between the write path circuitry and read pathcircuitry enables the reuse of ECC generation logic on one side of theprocessor memory to check for errors on the other side reducing the ECClogic requirement and saving significant semiconductor chip area.

Those skilled in the art to which this disclosure relates willappreciate that many other embodiments and variations of embodiments arepossible within the scope of the claimed invention, and furtheradditions, deletions, substitutions and modifications may be made to thedescribed embodiments without departing from the scope of thisdisclosure.

1-7. (canceled)
 8. A method of fault detection for error correction code(ECC) hardware for a single port memory circuit having write generation(Gen) ECC logic in a write path circuitry and check ECC logic includingread Gen ECC logic in read path circuitry, comprising: comparing anoutput of said read Gen ECC logic to an output of said write Gen ECClogic; detecting a fault in said write Gen ECC logic or in said read GenECC logic when a comparison output from said comparing determines avalue of said output of said write Gen ECC logic does not equal a valueof said output of said read Gen ECC logic, and wherein when said faultis a single-bit error correcting said single-bit error, and when saidfault is a multi-bit error sending a multi-hit error interrupt signal.9. The method of claim 8, wherein said read path circuitry fluffiercomprises an XOR circuit coupled to an output of said read Gen ECC logicthat has another input coupled to an ECC output of said memory circuit,and wherein an output of said XOR circuit provides a syndrome output toa syndrome decode block coupled to a single bit error correction (SEC)block and mufti-bit error generation circuitry, further comprisingcoupling said comparison output as an enable input of multiple bit errordetection (MED) circuitry and as an enable input of SEC block.
 10. Themethod of claim 8, wherein said comparing and said detecting isperformed continuously for every clock cycle.
 11. The method of claim 8,wherein said single port memory circuit comprises a static random accessmemory (SRAM), read only memory (ROM), or a flash memory.
 12. The methodof claim 8, wherein said single port memory circuit is a memory for aprocessor of an Advanced Driver Assistance System (ADAS). 13-20.(canceled)
 21. A method of fault detection for error correction code(ECC) hardware, comprising: comparing an output of read Gen ECC logic toan output of write Gen ECC logic for a single port memory circuit havingwrite generation (Gen) ECC logic in a write path circuitry and check ECClogic including read Gen ECC logic in read path circuitry; detecting afault in said write Gen ECC logic or in said read Gen ECC logic when acomparison output from said comparing determines a value of said outputof said write Gen ECC logic does not equal a value of said output ofsaid read Gen ECC logic, and wherein when said fault is a single-biterror correcting said single-bit error, and when said fault is amulti-hit error sending a multi-bit error interrupt signal.
 22. Themethod of claim 21, wherein said read path circuitry further comprisesan XOR circuit coupled to an output of said read Gen ECC logic that hasanother input coupled to an ECC output of said memory circuit, andwherein an output of said XOR circuit provides a syndrome output to asyndrome decode block coupled to a single bit error correction (SEC)block and multi-bit error generation circuitry, further comprisingcoupling said comparison output as an enable input of multiple bit errordetection (MED) circuitry and as an enable input of SEC block.
 23. Themethod of claim 21, wherein said comparing and said detecting isperformed continuously for every clock cycle.
 24. The method of claim21, wherein said single port memory circuit comprises a static randomaccess memory (SRAM), read only memory (ROM), or a flash memory.
 25. Themethod of claim 21, wherein said single port memory circuit is a memoryfor a processor of an Advanced Driver Assistance System (ADAS).
 26. Anapparatus, comprising: circuitry for comparing an output of read Gen ECClogic in read path circuitry to an output of write Gen ECC logic inwrite path circuitry of a single port memory circuit; circuitry fordetecting a fault in said write Gen ECC logic or in said read Gen ECClogic when a comparison output from said comparing determines a value ofsaid output of said write Gen ECC logic does not equal a value of saidoutput of said read Gen ECC logic, and wherein when said fault is asingle-bit error correcting said single-bit error, and when said faultis a multi-bit error sending a multi-bit error interrupt signal.
 27. Theapparatus of claim 26, wherein said read path circuitry furthercomprises an XOR circuit coupled to an output of said read Gen ECC logicthat has another input coupled to an ECC output of said memory circuit,and wherein an output of said XOR circuit provides a syndrome output toa syndrome decode block coupled to a single bit error correction (SEC)block and multi-bit error generation circuitry, further comprisingcoupling said comparison output as an enable input of multiple bit errordetection (MED) circuitry and as an enable input of SEC block.
 28. Theapparatus of claim 26, wherein said comparing and said detecting isperformed continuously for every clock cycle.
 29. The apparatus of claim26, wherein said single port memory circuit comprises a static randomaccess memory (SRAM), read only memory (ROM), or a flash memory.
 30. Theapparatus of claim 26, wherein said single port memory circuit is amemory for a processor of an Advanced Driver Assistance System (ADAS).31. An apparatus, comprising: means for comparing an output of read GenECC logic in read path circuitry to an output of write Gen ECC logic inwrite path circuitry of a single port memory circuit; means fordetecting a fault in said write Gen ECC logic or in said read Gen ECClogic when a comparison output from said comparing determines a value ofsaid output of said write Gen ECC logic does not equal a value of saidoutput of said read Gen ECC logic, and means when said fault is asingle-bit error correcting said single-bit error, and when said faultis a multi-bit error sending a multi-bit error interrupt signal.
 32. Theapparatus of claim 31, wherein said read path circuitry furthercomprises an XOR circuit coupled to an output of said read Gen ECC logicthat has another input coupled to an ECC output of said memory circuit,and wherein an output of said XOR circuit provides a syndrome output toa syndrome decode block coupled to a single bit error correction (SEC)block and multi-bit error generation circuitry, further comprisingcoupling said comparison output as an enable input of multiple bit errordetection (MED) circuitry and as an enable input of SEC block.
 33. Theapparatus of claim 31, wherein said comparing and said detecting isperformed continuously for every clock cycle.
 34. The apparatus of claim31, wherein said single port memory circuit comprises a static randomaccess memory (SRAM), read only memory (ROM), or a flash memory.
 35. Theapparatus of claim 31, wherein said single port memory circuit is amemory for a processor of an Advanced Driver Assistance System (ADAS).36. An apparatus, comprising: error correction code (ECC) hardware for asingle port memory circuit having write generation (Gen) ECC logic in awrite path circuitry and check ECC logic including read Gen ECC logic inread path circuitry; circuitry for comparing an output of said read GenECC logic to an output of said write Gen ECC logic; circuitry fordetecting a fault in said write Gen ECC logic or in said read Gen ECClogic when a comparison output from said comparing determines a value ofsaid output of said write Gen ECC logic does not equal a value of saidoutput of said read Gen ECC logic, and wherein when said fault is asingle-bit error correcting said single-bit error, and when said faultis a multi-hit error sending a multi-bit error interrupt signal.
 37. Theapparatus of claim 36, wherein said read path circuitry furthercomprises an XOR circuit coupled to an output of said read Gen ECC logicthat has another input coupled to an ECC output of said memory circuit,and wherein an output of said XOR circuit provides a syndrome output toa syndrome decode block coupled to a single bit error correction (SEC)block and multi-bit error generation circuitry, further comprisingcoupling said comparison output as an enable input of multiple bit errordetection (MED) circuitry and as an enable input of SEC block.
 38. Theapparatus of claim 36, wherein said comparing and said detecting isperformed continuously for every clock cycle.
 39. The apparatus of claim36, wherein said single port memory circuit comprises a static randomaccess memory (SRAM), read only memory (ROM), or a flash memory.
 40. Theapparatus of claim 36, wherein said single port memory circuit is amemory for a processor of an Advanced Driver Assistance System (ADAS).